package com.jingdianjichi.enums;

import lombok.Getter;

@Getter
public enum CallBackTypeEnum {

    SUBSCRIBE("subscribe","订阅公众号回调"),
    POSTCAPTCHA("text","发送验证发回调")
    ;

    private String code;
    private String info;

    CallBackTypeEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public static CallBackTypeEnum getByCode(String code){
        for (CallBackTypeEnum value : CallBackTypeEnum.values()) {
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
